import React, { Component } from 'react'
import Routers from "../router/Router.view"
import {connect} from "react-redux"
import Axios from 'axios';
 class Index extends Component {
    componentDidMount(){
        Axios.get("/list").then(res=>{
           this.props.startPropo(res.data)
        })
    }
    render() {
        return (
                <Routers routers={this.props.routers}></Routers>
        )
    }
}
export default connect(
    ()=>{
        return{

        }
    },(dispatch)=>{
        return {
            startPropo(obj){
                dispatch({type:"startPropo",obj})
            }
        }
    }
)(Index)